home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
eroticos
/
nude-streakers.swf
/
scripts
/
frame_13
/
PlaceObject2_1153_219
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2005-09-23
|
3KB
|
130 lines
onClipEvent(enterFrame){
this.swapDepths(this._y);
body.stop();
cx = int((- (_root.streakerx - _X)) / 3 + (- (_root.streakery - _Y)));
cy = int(- (_root.streakery - _Y) - (- (_root.streakerx - _X)) / 3);
if(Math.abs(cx) < 10 + dive_adj && Math.abs(cy) < 10 + dive_adj)
{
_root.script.streaker_fall();
}
this._x -= Math.cos(angle * 0.0174) * speed;
this._y -= Math.sin(angle * 0.0174) * speed;
if(state == "off")
{
speed = 0;
}
if(state == "dive")
{
if(Math.abs(cx) + Math.abs(cy) > 380)
{
speed = 0;
dive_adj = 0;
state = "on";
}
body.gotoAndStop("dive");
this._x -= Math.cos(angle * 0.0174) * speed;
this._y -= Math.sin(angle * 0.0174) * speed;
speed -= 4 * (speed > 0);
if(Math.abs(speed) < 3)
{
speed = 0;
}
}
if(state == "on")
{
if(Math.abs(cx) + Math.abs(cy) < 90 && Math.abs(cx) + Math.abs(cy) > 20 && speed == max_speed)
{
speed = 36;
dive_adj = 10;
state = "dive";
}
if(chasex == true)
{
if(Math.abs(cx) < 10)
{
chasey = true;
chasex = false;
}
us -= 4 * (us > 0);
ds -= 4 * (ds > 0);
if(cx < 0 && ls < max_speed)
{
if(rs + us + ds == 0)
{
ls += 2;
}
temp_angle = -162;
}
else if(ls > 0)
{
ls -= 10;
}
if(cx > 0 && rs < max_speed)
{
if(ls + us + ds == 0)
{
rs += 2;
}
temp_angle = 18;
}
else if(rs > 0)
{
rs -= 10;
}
}
if(chasey == true)
{
if(Math.abs(cy) < 10)
{
chasex = true;
chasey = false;
}
ls -= 4 * (ls > 0);
rs -= 4 * (rs > 0);
if(cy > 0 && us < max_speed)
{
if(ls + rs + ds == 0)
{
us += 2;
}
temp_angle = 162;
}
else if(us > 0)
{
us -= 10;
}
if(cy < 0 && ds < max_speed)
{
if(ls + rs + us == 0)
{
ds += 2;
}
temp_angle = -18;
}
else if(ds > 0)
{
ds -= 10;
}
}
if(speed <= 2)
{
this.gotoAndStop((ds > 0) * 1 + (ls > 0) * 2 + (us > 0) * 3 + (rs > 0) * 4);
angle = temp_angle;
body.gotoAndStop(1);
}
if(speed > 0)
{
body.play();
}
speed = ls + rs + us + ds;
ls = Math.max(0,ls);
rs = Math.max(0,rs);
us = Math.max(0,us);
ds = Math.max(0,ds);
}
else
{
body.stop();
}
}